#! /usr/bin/python

def GetUniqueWords(text):
  unique = {}
  text = text.split()
  for n in range(len(text)):
    keys = unique.keys()
    if text[n] in unique:
      unique[text[n]] += 1
    else:
      unique[text[n]] = 1
  return len(unique)

def main():
  # Open the file, read it into memory as a single string.
  with open('alice_in_wonderland.txt') as alice_file:
    alice_text = alice_file.read()

  print 'Unique words:', GetUniqueWords(alice_text)


if __name__ == '__main__':
  main()
